package conf

import "time"

// Config is comet config.
type Config struct {
	Env       *Env
	Websocket *Websocket
	Protocol  *Protocol
	Bucket    *Bucket
	RPCClient *RPCClient
	RPCServer *RPCServer
	Consul *Consul
	Log   *Log
}
type Consul struct {
	Addr string
}

type Log struct {
	Path string
}

// Env is env config.
type Env struct {
	Host      string
	Addrs     []string
	Port      string
	ServerId string
}


// RPCClient is RPC client config.
type RPCClient struct {
	Dial    time.Duration
	Timeout time.Duration
}

// RPCServer is RPC server config.
type RPCServer struct {
	Network           string
	Addr              string
	Timeout           time.Duration
}

// Websocket is websocket config.
type Websocket struct {
	Host      string
	Port      string
}

// Protocol is protocol config.
type Protocol struct {
	Timer            int
	TimerSize        int
	SvrProto         int
	CliProto         int
	HandshakeTimeout time.Duration
}

// Bucket is bucket config.
type Bucket struct {
	Size          int
	Channel       int
	Room          int
	RoutineAmount uint64
	RoutineSize   int
}
